package club.twelveblog.tblog.dao;

import club.twelveblog.tblog.entity.Admin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface AdminDao extends JpaRepository<Admin,Long>, CrudRepository<Admin,Long> {
    @Query(nativeQuery = true,value = "SELECT * FROM tb_admin WHERE admin_name=?1")
    Admin findByAdmin(String admin_name);
}
